package com.yunshipei.common.manager;

import android.graphics.Color;
import android.text.TextUtils;

import com.yunshipei.model.WaterMarkSettings;

public class EnterConfig {

    private EnterConfig() {
    }

    public static EnterConfig getInstance() {
        return EnterConfigInner.instance;
    }

    private static final class EnterConfigInner {
        private static final EnterConfig instance = new EnterConfig();
    }

    private String mThemeCode = "1";
    private WaterMarkSettings mWaterMarkSettings;
    private String mManagerServer;
    private long mSSOFetchStartTimeStamp = 0;

    public WaterMarkSettings getWaterMarkSettings() {
        return mWaterMarkSettings;
    }

    public void setWaterMarkSettings(WaterMarkSettings mWaterMarkSettings) {
        this.mWaterMarkSettings = mWaterMarkSettings;
    }

    public void setThemeCode(String mThemeCode) {
        if (TextUtils.isEmpty(mThemeCode)) {
            this.mThemeCode = "1";
        } else {
            this.mThemeCode = mThemeCode;
        }
    }

    public String getThemeCode() {
        return mThemeCode;
    }

    public int getGlobalColor() {
        switch (mThemeCode) {
            case "1":
                return Color.parseColor("#ED4832");
            case "2":
                return Color.parseColor("#14A1FF");
            case "3":
                return Color.parseColor("#02599C");
            case "4":
                return Color.parseColor("#00C285");
            case "5":
                return Color.parseColor("#FF772C");
            case "6":
                return Color.parseColor("#363748");
            default:
                return Color.parseColor("#ED4832");
        }
    }

    public int getStatusBarGlobalColor() {
        switch (mThemeCode) {
            case "1":
                return Color.parseColor("#C93D2A");
            case "2":
                return Color.parseColor("#1189D9");
            case "3":
                return Color.parseColor("#014B84");
            case "4":
                return Color.parseColor("#00A571");
            case "5":
                return Color.parseColor("#D96525");
            case "6":
                return Color.parseColor("#2D2E3D");
            default:
                return Color.parseColor("#C93D2A");
        }
    }

    public String optGlobalColor() {
        switch (mThemeCode) {
            case "1":
                return "#ED4832";
            case "2":
                return "#14A1FF";
            case "3":
                return "#02599C";
            case "4":
                return "#00C285";
            case "5":
                return "#FF772C";
            case "6":
                return "#363748";
            default:
                return "#ED4832";
        }
    }

    public String getManagerServer() {
        return mManagerServer;
    }

    public void setManagerServer(String managerServer) {
        this.mManagerServer = managerServer;
    }

    public long getSSOFetchStartTimeStamp() {
        return mSSOFetchStartTimeStamp;
    }

    public void setSSOConfigFetchStartTimeStamp(long mSwaStartTimeStamp) {
        this.mSSOFetchStartTimeStamp = mSwaStartTimeStamp;
    }
}
